package thread;

import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了......");
        /*

         */
        System.out.println("请输入倒计时秒数：");
        try {
            Scanner scanner=new Scanner(System.in);
            int i= scanner.nextInt();
            for (int j = i; j>=0 ; j--) {
                Thread.sleep(1000);
                System.out.print(j+"\t");
            }


        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("程序结束了！");
    }
}
